<demo>简单引用对话框</demo>
<template>
<div>
    <Button @click="openDialog">打开对话框</Button>
</div>
</template>

<script lang="ts">
import Button from '../lib/Button.vue'
import {
    showDialog
} from '../lib/showDialog'
import {
    h
} from 'vue'
export default {
    components: {
        Button
    },
    setup() {
        const openDialog = () => {
            showDialog({
                title: h('strong', {}, '标题'),
                content: '你好',
                ok() {
                    console.log('ok')
                },
                cancel() {
                    console.log('cancel')
                }
            })
        }
        return {
            openDialog
        };
    }
}
</script>
